package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.DmcCsunHumidistatLocation;
import com.csun.cmny.provider.model.dto.humidistat.BindCsunHumidistatLocationDto;
import com.csun.cmny.provider.model.dto.humidistat.CsunHumidistatQueryDto;
import com.csun.cmny.provider.model.dto.propertyManagement.SelectDeviceDataDto;
import com.csun.cmny.provider.model.vo.HumidistatReqVo;
import com.csun.cmny.provider.model.vo.humidistat.CsunHumidistatVo;
import com.csun.cmny.provider.model.vo.life.DmcDeviceByRoom;
import com.csun.cmny.provider.model.vo.life.lifeRoomHumidistat;
import com.csun.cmny.provider.model.vo.propertyManagement.PropertyDataVo;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-12-27 15:18
 * @Description:
 */
public interface DmcCsunHumidistatLocationService extends IService<DmcCsunHumidistatLocation> {

    /**
     * query dmc csun humidistat and location list with page
     *
     * @param csunHumidistatQueryDto    the csun humidistat query dto
     *
     * @return  the list
     */
    List<CsunHumidistatVo> queryListWithPage(CsunHumidistatQueryDto csunHumidistatQueryDto);

    /**
     * delete dmc csun humidistat by id
     *
     * @param id    the csun humidistat id
     *
     * @return  the int.
     */
    Integer deleteById(Long id);

    /**
     * bind dmc csun humidistat and location
     *
     * @param bindCsunHumidistatLocationDto the bind csun humidistat location
     * @param loginAuthDto  the login auth dto
     *
     * @return  the int
     */
    Integer bind(BindCsunHumidistatLocationDto bindCsunHumidistatLocationDto, LoginAuthDto loginAuthDto);

    /**
     * untied dmc csun humidistat and location
     *
     * @param deviceId  the dmc csun humidistat id
     *
     * @return  the int
     */
    Integer untied(Long deviceId);

    /**
     * 根据房间id查询绑定的设备id
     * untied dmc csun humidistat and location
     *
     * @param roomId  房间id
     *
     * @return  the list
     */
    List<Long> selectDeviceIdByRoomId(Long roomId);

    /**
     * 根据房间id查询温度
     *
     * @param roomId  房间id
     *
     * @return  the list
     */
    List<String> selectTemperatureByRoomId(Long roomId);

    /**
     * 根据房间id查询温度
     *
     * @param roomId  房间id
     *
     * @return  the list
     */
    List<lifeRoomHumidistat> selectHumidistatByRoomId(Long roomId);

    /**
     * get csun humidistat by device no
     *
     * @param deviceNo  the device no
     *
     * @return  the csun humidistat vo
     */
    CsunHumidistatVo getCsunHumidistatByDeviceNo(String deviceNo);

    /**
     *
     * @param alertId
     * @return
     */
    DmcDeviceByRoom selectRoomIdByDeviceId(Long alertId);

    /*
    * 查询网关绑定的温度计数据
    * */
    List<CsunHumidistatVo> listGatewayBindHumidistat(Long deviceId);

    /*
    * 查询单个温度计数据
    * */
    CsunHumidistatVo get(Long deviceId);

    /**
     * 根据房间Id查询温湿度计数据
     *
     * @param roomIdList the room id list
     *
     * @return the humidistat req vo list
     */
    List<HumidistatReqVo> queryHumidistatByRoomIds(List<Integer> roomIdList);
    List<PropertyDataVo> selectDeviceData(SelectDeviceDataDto selectDeviceDataDto);

    DmcCsunHumidistatLocation selectlocationBydeviceNo(String deviceNo);
}
